#ifndef FND_GAME_2D_MOVER_HPP
#define FND_GAME_2D_MOVER_HPP
#include "drawer.hpp"
namespace FndGame2D {

  class mover : public drawer {
  public:
    typedef mover class_type ;
    typedef drawer base_type ;
    typedef sf::Vector2f position_type ;
    explicit mover(const std::string& name = std::string(), int draw_level = 0,
		   const position_type& position = sf::Vector2f(.0f,0.f),
		   float angle = 0.0f):
      drawer(name, draw_level),
      m_position(position),
      m_angle(angle)
    {
      add_property<bool>(IS_MOVER, true) ;
    } 
  public:
    static const std::string IS_MOVER ;
    const position_type& get_position()const {return m_position ;}
    void set_position(const position_type& pos) {m_position = pos ;}
    void set_position(float x, float y) {m_position.x = x; m_position.y = y;}
    float x()const {return m_position.x;}
    float y()const {return m_position.y;}
    void set_x(float x) {m_position.x = x ;}
    void set_y(float y) {m_position.y = y ;}
    void move(const position_type& pos) {m_position += pos ;}
    void move(float x, float y) {move(position_type(x,y)) ;}
    float angle()const {return m_angle ;}
    void set_angle(float angle) {m_angle = angle ;}
    void rotate(float angle) {m_angle += angle ;}
  private:
    position_type m_position ;
    float m_angle ;
    
  } ;
}
#endif
